/*
    $Header: /Windows/Shell/ShellExt.root/ShellExt/src/CQurInfo.h 1     08-01-05 0:08 Ken $
    $Log: /Windows/Shell/ShellExt.root/ShellExt/src/CQurInfo.h $
 * 
 * 1     08-01-05 0:08 Ken
*/

// ..\Src\CQurInfo.h : Declaration of the CQueryInfo

#pragma once
#include "resource.h"       // main symbols

#include "ShellExt.h"

#include "CIShellExtImp.h"
#include "CJunction.h"


// CQurInfo

class ATL_NO_VTABLE CQurInfo :
    public CComObjectRootEx<CComSingleThreadModel>,
    public CComCoClass<CQurInfo, &CLSID_QurInfo>,
    public IDispatchImpl<IQurInfo, &IID_IQurInfo, &LIBID_ShellExtLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
    ,public CIShellExtInitImp
    ,public IQueryInfo
{
public:
    CQurInfo()
    {
    }

DECLARE_REGISTRY_RESOURCEID(IDR_QURINFO)


BEGIN_COM_MAP(CQurInfo)
    COM_INTERFACE_ENTRY(IQurInfo)
    COM_INTERFACE_ENTRY(IDispatch)
    COM_INTERFACE_ENTRY(IPersistFile)
    COM_INTERFACE_ENTRY(IQueryInfo)
END_COM_MAP()


    DECLARE_PROTECT_FINAL_CONSTRUCT()

    HRESULT FinalConstruct()
    {
    return S_OK;
    }

    void FinalRelease()
    {
    }

// the init implement
private:
    BOOL VTgtInit(TCHAR* pszFl){return FALSE;};
    BOOL VSrcInit(UINT uSrcId, TCHAR* pszFl, BOOL fLoad=FALSE/*called by Load*/ );

// IQueryInfo
public:
    STDMETHOD(GetInfoFlags)(DWORD*) { return E_NOTIMPL; }
    STDMETHOD(GetInfoTip)(DWORD, LPWSTR*);

private:
    BOOL    m_fJunct;
    BY_HANDLE_FILE_INFORMATION    m_flinfo;
    CJunction    m_cjunct;
};

OBJECT_ENTRY_AUTO(__uuidof(QurInfo), CQurInfo)
